import java.util.*;
public class Main{
    //递归法
    //递归到最后只有三种情况
    public static int solution(int a,int b){
        if((a==1&&b==2)||(a==2&&b==1)){
            return 3;
        }
        if(a==1&&b==1){
            return 2;
        }
        if(a==0||b==0){
            return 1;
        }
        return solution(a,b-1)+solution(a-1,b);

    }
    public static void main(String[]args){
        Scanner sc=new Scanner (System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        int c=solution(a,b);
        System.out.println(c);
    }
}